package com.example.gongj;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.ObjectInputStream;

public class ObjectInputStreamDemo {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("ee.txt");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Student s = (Student)ois.readObject();
        ois.close();
        fis.close();
        System.out.println(s.toString());
    }
}
